home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Shareware Grab Bag
/
Shareware Grab Bag.iso
/
003
/
books.arc
/
COAREPT.PRG
< prev
next >
Wrap
Text File
|
1985-04-18
|
2KB
|
76 lines
* coarept.prg
* Print the chart of accounts and balances
* Get date of last update and company name.
use geninfo
store last:updat to last:date
store company to company
* use chart of account file and index
use coa index coa
* Ask about hardcopy.
erase
store " " to yn
@ 5,2 say "Send report to printer? " get yn pict "!"
read
* Calculate income and expenses totals for mtd,
* qtd, and ytd; leaving out subaccounts
erase
? "Calculating totals....."
sum amount for acct<300 .and. int(acct)=acct to tot:mtd1
sum amount for acct>=300 .and. int(acct)=acct to tot:mtd2
sum qtd for acct<300 .and. int(acct)=acct to tot:qtd1
sum qtd for acct>=300 .and. int(acct)=acct to tot:qtd2
sum ytd for acct<300 .and. int(acct)=acct to tot:ytd1
sum ytd for acct>=300 .and. int(acct)=acct to tot:ytd2
* mark subaccounts with asterisk
repl noupdat all marker with " "
repl noup all marker with "*" for int(acct) <> acct
* If printer selected, set it on
erase
if YN = "Y"
set print on
endif
set eject off
* Print report title
? " Chart of Accounts for &company"
?
? "Last Update: &last:date"
* print income accounts and totals
?
? "INCOME:"
repo form coa for acct<300 plain
? "Total Income "+str(tot:mtd1,10,2)+;
" "+str(tot:qtd1,10,2)+" "+str(tot:ytd1,10,2)
? "EXPENSES:"
repo form coa for acct>=300 plain
? "Total Expenses "+str(tot:mtd2,10,2)+;
" "+str(tot:qtd2,10,2)+" "+str(tot:ytd2,10,2)
?
? "Balance ",;
str(tot:mtd1-tot:mtd2,10,2)+" "+;
str(tot:qtd1-tot:qtd2,10,2)+" "+;
str(tot:ytd1-tot:ytd2,10,2)
?
?
?
? " NOTE: Subaccounts marked with a *"
?? "are not included in totals"
eject
set print off
if yn <> "Y"
?
?
? "Press any key to continue..."
wait
endif
release company,last:date,yn,tot:mtd1,tot:mtd2
release tot:qtd1,tot:qtd2,tot:ytd1,tot:ytd2
return